Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

214
Visualizações
The ejs code does not give an output [EJS]

I have a problem. I'm writing a panel for my discord bot, I'm using ejs. The server is based on the express and passport library. The problem is that I want to display the name of the mysql database but I am not getting the result in the browser and with other results the result is displayed. Please help. I'm posting the code.

main.ejs

<%= server.guild_id %> <!-- 76593313568....704  -->

<% database.sql("SHOW DATABASES", 0, (rows) => { %>
   <%= rows[0].Database %> <!-- nothing -->
<% }) %> 

dashboard.js - route

const router = require('express').Router()
const database = require('./../database/database.js')

[...]

res.render('dashboard/server/main', {
    guilds: req.user.guilds,
    servers: rows,
    user: req.user,
    admin: false,
    points: 0,
    server: server,
    database: database
})

If I use the console.log code, I can see the database without any problems

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda